import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

/**
 * @ClassName Demo04_BufferedWriter
 * @Description 字符缓冲输出流
 * @Author Li
 * @Date 2022/8/12 9:34
 * @ModifyDate 2022/8/12 9:34
 * @Version 1.0
 */
public class Demo04_BufferedWriter {
    public static void main(String[] args) throws IOException {
        // 创建流对象
        BufferedWriter bw = new BufferedWriter(new FileWriter("src/part10/ch01_BufferedStream/a.txt"));
        // 写数据
        bw.write("春蚕到死丝方尽");
        // 写换行
        bw.newLine();
        // 继续写数据
        bw.write("蜡炬成灰泪始干");
        // 关闭资源
        bw.close();
    }
}
